package com.example.recording;

import android.app.Application;
import android.os.Handler;
import android.util.Log;


/**
 * App
 */
public class App extends Application {
    private static final String TAG = "App";

    public static App sInstance;

    public Handler mHandler;

    public static App getInstance() {
        return sInstance;
    }

    @Override
    public void onCreate() {
        super.onCreate();

        try {
            Log.e(TAG, "onCreate...");

            mHandler = new Handler();
            sInstance = this;

        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }

    @Override
    public void onTerminate() {
        super.onTerminate();
        Log.e(TAG, "onTerminate...");

        mHandler = null;
        sInstance = null;
    }
}
